import router from '@system.router';
export default {
    data: {
        title: 'World'
    },
    onInit(){
        console.log(this.data1)
    },
    backPreview(){
        router.back();
    },
    backUri(){
        router.back({uri:'pages/jsBasic/appRouter/appRouter'});
    },
    enableAlertBeforeBackPage(){
        console.log(111)
// @ts-ignore
        router.enableAlertBeforeBackPage({
            message: 'Message Info',
            success: function() {
                console.log('success');
            },
            fail: function() {
                console.log('fail');
            },
        });
    },
    disableAlertBeforeBackPage(){
        // @ts-ignore
        router.disableAlertBeforeBackPage({
            success: function() {
                console.log('success');
            },
            fail: function() {
                console.log('fail');
            },
        });
    }
}
